<!DOCTYPE html>
<html>
<head>
  <title>我的晒单</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0"/>
  <meta content="yes" name="apple-mobile-web-app-capable" />
  <meta content="black" name="apple-mobile-web-app-status-bar-style" />
  <meta content="telephone=no" name="format-detection" />
  <link href="{G_TEMPLATES_CSS}/wx/user.css" rel="stylesheet">
  <link href="{G_TEMPLATES_CSS}/wx/comm.css" rel="stylesheet">
  <script src="{G_TEMPLATES_JS}/wx/jquery-2.1.4.min.js"></script>
  
</head>
<body>
  {wc:templates "mobile/index","header"}
  <div class="shaidan-main">
   <ul>
     <li><span class="account-main-fl select">已晒单</span></li>
     <li><span class="account-main-fl">审核中</span></li>
     <li><span class="account-main-fl">未晒单</span></li>
     <div class="clear"></div>
   </div>
   
   <!--已晒单-->
   <div class="shaidan-list">
     <ul>
      {wc:loop $shaidan $shaidan}
      <li>  
       <img src="{G_UPLOAD_PATH}/{wc:$member['img']}" class="shaidan-touimg">
       <span class="shaidan-username">{wc:$member['username']}</span>
       <!--  <span class="try"><img src="images/shanchu.png"></span> -->
       <a href="{WEB_PATH}/mobile/home/usershaidandetail/{wc:$shaidan['sd_id']}/{wc:$shaidan['sd_shopid']}">
        <div class="shaidan-content">{wc:$shaidan['sd_content']}</div></a>
        <!--  <span class="jx-date">揭晓日期：<?echo date("Y-m-d",$shaidan['sd_time'])?></span> -->
        <a href="{WEB_PATH}/mobile/home/usershaidandetail/{wc:$shaidan['sd_id']}/{wc:$shaidan['sd_shopid']}">
          <ul class="goods-shaidan">
            <? $shaiimg=explode(';',$shaidan['sd_photolist'])
            ;
            $counts = count($shaiimg)-1;
          if($counts>3)
          {
          $counts=2;
          }else{
          $counts=$counts;
          }
            for($i=0;$i < $counts;$i++ ){
            echo '<li>';
            echo '<img src="'.G_UPLOAD_PATH.'/'.$shaiimg[$i].'">';
              echo '</li>';
          }
          ?>
        </ul>
      </a><br />
      <span class="shaidan-update">
        <?echo date("Y-m-d",$shaidan['sd_time'])?>更新</span>
        <div class="zan">
          <img src="{G_TEMPLATES_IMAGE}/wx/zan.png" class="xin" state="0">
          <span class="zan-num">{wc:$shaidan['sd_zhan']}</span>
        </div>
      </li>
      {wc:loop:end}
    </ul>
  </div>
  
  <!--审核中-->
  <div class="shaidan-list" style="display:none;">
   <ul>
       {wc:loop $shaidanCHENK $shaidan}
     <li>
       <img src="{G_UPLOAD_PATH}/{wc:$member['img']}" class="shaidan-touimg">
       <span class="shaidan-username">{wc:$member['username']}</span>
       <span class="try">审核中...</span>
         <a href="{WEB_PATH}/mobile/home/usershaidandetail/{wc:$shaidan['sd_id']}/{wc:$shaidan['sd_shopid']}">
             <div class="shaidan-content">{wc:$shaidan['sd_content']}</div></a>
       <!--<span class="jx-date">预计完成时间:06-12(具体时间以消息通知为准)</span>-->
       <a href="{WEB_PATH}/mobile/home/usershaidandetail/{wc:$shaidan['sd_id']}/{wc:$shaidan['sd_shopid']}">
           <ul class="goods-shaidan">
               <? $shaiimg=explode(';',$shaidan['sd_photolist'])
            ;
            $counts = count($shaiimg)-1;
          if($counts>3)
          {
          $counts=3;
          }else{
          $counts=$counts;
          }
            for($i=0;$i < $counts;$i++ ){
            echo '<li>';
               echo '<img src="'.G_UPLOAD_PATH.'/'.$shaiimg[$i].'">';
               echo '</li>';

       }
       ?>
       </ul>
     </a><br />
     <span class="shaidan-update" style="float:right;margin-right:15%;"> <?echo date("Y-m-d",$shaidan['sd_time'])?>上传</span>
   </li>
       {wc:loop:end}
 </ul>
</div>

<!--未晒单-->
<div class="shaidan-list" style="display:none;">
 <ul>
  {wc:loop $record $record}
  <li>
    <div class="shaidan-content2">{wc:$record['title']}</div>
    <img src="{G_UPLOAD_PATH}/{wc:$record['thumb']}" class="shaidan-goods-img">
    <span class="weishaidan-font">参与人次：{wc:$record['gonumber']}</span>
    <span class="weishaidan-font" style="margin-top:5px;">开奖期数：{wc:$record['shopqishu']}</span>
    <span class="weishaidan-font" style="margin-top:5px;">幸运号码：{wc:$record['huode']}</span>
    <span class="weishaidan-font" style="margin-top:5px;">揭晓时间：<?
      echo date("Y-m-d H:i:s",$record['q_end_time'])
      ?></span>
      <div style="clear:both;"></div>
      <div class="shaidan-del">
        <img src="{G_TEMPLATES_IMAGE}/wx/shanchu.png">
        <span>删除</span>
      </div>
      <div class="shaidan-add">
        <img src="{G_TEMPLATES_IMAGE}/wx/shanchu.png">
        <span>晒单</span>
      </div>
    </li>
    {wc:loop:end}
  </ul>
</div>


<script>
 $(document).ready(function(e) {
  $(".shaidan-main ul li").click(function(){
   $(".account-main-fl").removeClass("select");
   var sw=$(".shaidan-main ul li").index(this);
   $(".shaidan-main ul li").eq(sw).children("span").addClass("select");
   $(".shaidan-list").eq(sw).show().siblings(".shaidan-list").hide();
 })
  $(".order-del-img").click(function(){
   if(confirm("确认删除吗")){
    alert("yes");
  }else{
    alert("no")
    return;
  }
})
});
</script>
<script>
  $(document).ready(function(e) {
    $(".xin").click(function(){
      var sw=$(".xin").index(this);
      var sta=$(".xin").eq(sw).attr("state");
      var zNum=parseInt($(".zan-num").eq(sw).text());
      if(sta==0){
       $(".xin").eq(sw).attr("src","images/zan_click.png");
       $(".xin").eq(sw).attr("state","1");
       zNum++;
       $(".zan-num").eq(sw).text(zNum);
     }else{
       $(".xin").eq(sw).attr("src","images/zan.png");
       $(".xin").eq(sw).attr("state","0");
       zNum--;
       $(".zan-num").eq(sw).text(zNum);
     }
   })
  });
</script>
</body>
</html>
